
<template>
  <page>
    <div slot="body">
      <el-table v-loading="loading" :data="tableData" border>
        <el-table-column label="序号" align="center" type="index"  width="80"/>
        <el-table-column label="用户名" align="center" prop="userName"/>
        <el-table-column label="登录地点" align="center" prop="loginLocation"/>
        <el-table-column label="操作内容" align="center" prop="msg"/>
        <el-table-column label="操作时间" align="center" prop="loginTime" width="180"/>
        <el-table-column label="IP" align="center" prop="ipaddr" width="180"/>
      </el-table>
    </div>
    <div slot="footer">
      <el-pagination
        background
        :page-size="pageVO.pageSize"
        :current-page.sync="pageVO.pageNum"
        :total="pageVO.total"
        :layout="pageOptions.layout"
        :page-sizes="pageOptions.pageSizes"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
      />
    </div>
  </page>
</template>

<script>
import pageQuery from "../../mixins/pageQuery";
import { getSystemLog } from "@/api/systemLog";

export default {
  mixins: [pageQuery],
  data() {
    return {
      tableData: [],
      pass: false,
      selection: false,
      loading:true,
      pageVO:{
        total: 0,
        pageNum: 1,
        pageSize: 10,
      }
    }
  },
  mounted(){
    this.getTableData()
  },
  methods: {
    getTableData(){
      const parmas={
        pageNo:this.pageVO.pageNum,
        pageSize:this.pageVO.pageSize
      }
      getSystemLog(parmas).then(res=>{
        this.loading=false
        this.tableData=res.data.data
        this.pageVO.total=res.data.total
      })
    },
  }
}
</script>
<style>
.app-contional{
  padding: 20px;
}
</style>